#ifndef WXSALMONFRAME_H
#define WXSALMONFRAME_H

#define wxUSE_GLCANVAS  1
#define wxUSE_ACCEL     1

#ifndef WX_PRECOMP
    #include <wx/wx.h>
#endif

class wxSalmonApp;
class wxSalmonCanvas;
class FiniteElementModel;

class wxSalmonFrame: public wxFrame
{
public:
    wxSalmonFrame(wxFrame *frame, const wxString& title,
                    const wxPoint& pos, const wxSize& size,
                    long style = wxDEFAULT_FRAME_STYLE);
    ~wxSalmonFrame();

	void SetFEMModel(FiniteElementModel* f);
	FiniteElementModel* GetFEMModel(void);

private:

    enum
    {
        idMenuFileExit = 1000,
        idMenuFileWriteSurface,
        idMenuFileWriteState,
        idMenuFileWriteMesh,
        idMenuFileWriteAll,

        idMenuViewLightConst = 1100,
        idMenuViewForceConst,
        idMenuViewReset,
        idMenuViewViewConst,
        idMenuViewToggleShowBack,
        idMenuViewToggleFog,
        idMenuViewToggleEdge,
        idMenuViewToggleInside,
        idMenuViewToggleLighting,
        idMenuViewToggleTetQuality,
        idMenuViewToggleSmooth,
        idMenuViewToggleNormal,
        idMenuViewToggleRelaxation,
        idMenuViewToggleSurfaceSelector,
        idMenuViewToggleSolid,
        idMenuViewToggleOriginal,
        idMenuViewToggleForceDisplay,

        idMenuForceInitialLoad=1200,
        idMenuForceReset,
        idMenuForceFix,
        idMenuForceControlMouse,

        idMenuCutsNewCut=1300,
        idMenuCutsEnd,
        idMenuCutsBigger,
        idMenuCutsSmaller,
        idMenuCutsControlMouse,

        idMenuMiscStats=1400,

        idMenuHelpAbout=1500,

		idMenuTestingCollapse=1600
    };

    void OnClose(wxCloseEvent& event);
    void OnIdle (wxIdleEvent&);

    void OnExit(wxCommandEvent& event);
    void OnAbout(wxCommandEvent& event);
	void OnWriteState (wxCommandEvent &event);
	void OnWriteMesh (wxCommandEvent &event);
	void OnWriteBoundary (wxCommandEvent &event);
	void OnWriteAll (wxCommandEvent &event);

	void OnViewLight (wxCommandEvent &event);
	void OnViewView (wxCommandEvent &event);
	void OnViewReset (wxCommandEvent &event);
	void OnViewToggleVar (wxCommandEvent &event);

	void OnInitialLoad (wxCommandEvent &event);
	void OnResetPstate (wxCommandEvent &event);
	void OnFixObject (wxCommandEvent &event);
	void OnMouseToForce (wxCommandEvent &event);

	void OnNewCut (wxCommandEvent &event);
	void OnModifyCut (wxCommandEvent &event);
	void OnStopCut (wxCommandEvent &event);
	void OnMouseToCut (wxCommandEvent &event);


	void OnTestingCollapse(wxCommandEvent &event);


    wxSalmonCanvas* pCanvas;
	FiniteElementModel* pFEM;


    DECLARE_EVENT_TABLE();

};

#endif // WXSALMONFRAME_H
